package com.cpp.pojo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

//create table exam_record
//        (
//                record_id   bigint auto_increment comment '记录ID'
//                        primary key,
//                exam_id     bigint                             not null comment '考试ID',
//                user_id     bigint                             not null comment '参加考试的用户ID',
//                start_time  datetime default CURRENT_TIMESTAMP not null comment '开始考试时间',
//                submit_time datetime                           null comment '提交时间',
//                total_score int      default 0                 null comment '总得分',
//                attempt_num int      default 1                 not null comment '第几次尝试',
//                status      char     default '0'               null comment '状态(0进行中,1已完成)'
//        )
//comment '考试记录表';
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ExamRecord {
    @TableId(type = IdType.AUTO)
    private Long recordId;
    private Long examId;
    private Long userId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;
    private Integer totalScore;
    private Integer attemptNum;
    private String status;
}
